package org.bridgen.test.compare;

/**
 * 
 * @author Emma Söderberg <emma add cs.lth.se>
 *
 */

public class Label {
	protected Object data;
	protected String prefix;

	public static Label create(Object data, String prefix) {
		return new Label(data, prefix);
	}

	protected Label(Object data, String prefix) {
		this.data = data;
		this.prefix = prefix;
	}

	public Object data() {
		return data;
	}

	// Empty
	
	protected static final Empty empty = new Empty();
	public static Empty empty() {
		return empty;
	}

	public static class Empty extends Label {
		private Empty() {
			super(new Object(), "Empty");
		}
	}
	
	// Print
	
	public String toString() {
		return prefix + data.toString();
	}
}
